﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using LuWeibo.ViewModels;

namespace LuWeibo.Views
{
    //微博详细信息
    public partial class StatusDeatailPage : PhoneApplicationPage
    {
        public StatusDeatailPage()
        {
            InitializeComponent();
        }

        private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (StatusDetailPivot.SelectedIndex == 1)//选中评论列表时 -- 这个地方也可以转换到viewmodel中来实现
            {
                StatusDetailViewModel statusDetailViewModel = (StatusDetailViewModel)this.DataContext;
                statusDetailViewModel.GetCommentsExecute(statusDetailViewModel.CurrentStatus.id);
            }
        }
    }
}